package com.wx.oauth.utils;

import javax.servlet.http.Cookie;

/**
 * @author Chenhaowen
 * @since 2019/8/6 16:09.
 */
public class CookieUtils {

    public static String getValByKey(String key, Cookie[] cookies){
        for(Cookie cookie : cookies){
            if(cookie.getName().equals(key)){
                return cookie.getValue();
            }
        }
        return "";
    }
}
